Chapter 9
Visualizing inhomogeneous linear ODE’s.
First-order equations.
Here we consider the following first-order IVP
\begin{align} y' + 2y = \operatorname{sin}(\omega t),\ y(0) = C. \end{align}
Using the method of integration factors, we find the solution to be
\begin{align} y(t) & = Ce^{-2t} + \dfrac{\omega e^{-2t} -\omega \operatorname{cos}(\omega t) + 2 \operatorname{sin}(\omega t)}{4 + \omega^2} \\ & = \Big(C + \dfrac{\omega}{4 + \omega^2}\Big) e^{-2t} + \dfrac{\operatorname{sin}(\omega t - \phi)}{\sqrt{4 + \omega^2}}, \hspace{1em} \text{where $\phi = \operatorname{arcsin}(\dfrac{\omega}{\sqrt{4 + \omega^2}})$.} \end{align}
To play with the visulization yourself, change the initial value $C$ or the frequency of forcing $\omega$, and see how the graph changes.
Questions to consider:
- How does the amplitude of response $y(t)$ depend on initial value $C$?
- How does the amplitude of response $y(t)$ depend on $\omega$?
- How does the phase shift of $y(t)$ change with the change of $\omega$?
Second-order equations.
Here we consider the following second-order IVP
\begin{align} y'' + \omega_0^2 y = \operatorname{sin}(\omega t),\ y(0) = y'(0) = 0, \end{align}
where $\omega_0 > 0$.
We can find the solution $y(t)$ using the method of variation of parameters, as described in this chapter. Let $u_1(t), u_2(t)$ be two linearly independent solutions of the corresponding homogeneous ODE $y'' + \omega_0^2 y = 0$. Here we take $u_1(t) = \operatorname{sin}({\omega_0} t)$ and $u_2(t) = \operatorname{cos}({\omega_0} t)$.
- The associated Wronskian is $W(t) = u_1(t)u_2'(t) - u_1'(t)u_2(t) = - \operatorname{sin}^2({\omega_0} t) - \operatorname{cos}^2({\omega_0} t) = -1$.
- The inhomogeneous ODE $y'' + \omega_0^2 y = \operatorname{sin}(\omega t)$ with initial conditions $y(0) = 0$ and $y'(0) = 0$ (which are our initial conditions) has exactly one solution, given by \begin{align} y(t) &= -u_1(t) \int_0^t \dfrac{u_2(t)\operatorname{sin}(\omega t)}{W(t)}ds + u_2(t) \int_0^t \dfrac{u_1(t)\operatorname{sin}(\omega t)}{W(t)} ds \\ & = \operatorname{sin}({\omega_0} t) \int_0^t {\operatorname{cos}({\omega_0} t)\operatorname{sin}(\omega t)}ds - \operatorname{cos}({\omega_0} t) \int_0^t {\operatorname{sin}({\omega_0} t)\operatorname{sin}(\omega t)} ds \\ &= \begin{cases} \dfrac{\operatorname{sin}(\omega t) - (\omega \operatorname{sin}({\omega_0} t))/{\omega_0}}{\omega_0^2 - \omega^2} & \omega \neq \pm \omega_0, \\ \dfrac{\operatorname{sin}(\omega t) - t\omega \operatorname{cos}(\omega t)}{2\omega^2} & \omega = \pm\omega_0. \end{cases} \end{align}
Notice that in the case $\omega = \pm\omega_0$ the solution formula has the term involving $t$ that grows unboundedly as time evolves. We say resonace occurs in this case, and resonance is explored more in Chapter 10.
Now it is time to have some fun and play a “guessing $\omega_0$ game”. Press the button to generate a random $\omega_0$, then vary $\omega$ to see how the graph changes and enter your guess for $\omega_0$.